(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-ad646336"], {
    3805: function(t, i, e) {
        t.exports = e.p + "appStatic/img/dksm.ba1301a5.png"
    },
    4781: function(t, i, e) {
        t.exports = e.p + "appStatic/img/dkjl.e75a8977.png"
    },
    5490: function(t, i, e) {
        "use strict";
        e("9a0e")("link", (function(t) {
            return function(i) {
                return t(this, "a", "href", i)
            }
        }
        ))
    },
    9022: function(t, i, e) {
        "use strict";
        var n = e("a1c6")
          , a = e.n(n);
        a.a
    },
    "9a0e": function(t, i, e) {
        var n = e("e46b")
          , a = e("238a")
          , s = e("f6b4")
          , r = /"/g
          , o = function(t, i, e, n) {
            var a = String(s(t))
              , o = "<" + i;
            return "" !== e && (o += " " + e + '="' + String(n).replace(r, "&quot;") + '"'),
            o + ">" + a + "</" + i + ">"
        };
        t.exports = function(t, i) {
            var e = {};
            e[t] = i(o),
            n(n.P + n.F * a((function() {
                var i = ""[t]('"');
                return i !== i.toLowerCase() || i.split('"').length > 3
            }
            )), "String", e)
        }
    },
    "9fbb": function(t, i, e) {
        t.exports = e.p + "appStatic/img/dkpm.0a8d8e19.png"
    },
    a1c6: function(t, i, e) {},
    e837: function(t, i, e) {
        "use strict";
        e.r(i);
        var n = function() {
            var t = this
              , i = t.$createElement
              , e = t._self._c || i;
            return e("section", {
                staticClass: "SecurityCard"
            }, [e("section", {
                staticClass: "SecurityCardbox"
            }, [e("div", {
                staticClass: "SecurityCard-box-banner"
            }), e("div", {
                staticClass: "SecurityCard-box-inner"
            }, [e("div", {
                staticClass: "inner-num"
            }, t._l(t.innerNum, (function(i) {
                return e("div", {
                    staticClass: "numC",
                    on: {
                        click: function(e) {
                            return t.goInfo(i)
                        }
                    }
                }, [e("p", {
                    staticClass: "t"
                }, [e("img", {
                    attrs: {
                        src: i.img,
                        alt: ""
                    }
                })]), e("p", {
                    staticClass: "n"
                }, [t._v(t._s(i.name))])])
            }
            )), 0), e("div", {
                staticClass: "activeTime"
            }, t._l(t.TimeList, (function(i) {
                return e("p", {
                    class: t.AcTime == i.id ? "active" : "",
                    attrs: {
                        disabled: t.AcTime != i.id
                    }
                }, [e("i"), t._v("\n          " + t._s(i.name) + ":" + t._s(t.timeInterval(i.time)) + "\n        ")])
            }
            )), 0), e("div", {
                staticClass: "RushlistBox"
            }, t._l(t.list, (function(i) {
                return e("div", {
                    staticClass: "Rushlist"
                }, [e("div", {
                    staticClass: "list"
                }, [e("div", {
                    staticClass: "left"
                }, [e("p", {
                    staticClass: "title"
                }, [e("span", [t._v(t._s(i.name))]), e("span")]), e("p", {
                    staticClass: "con"
                }, [t._v("保障安全，知识答题")])]), e("div", {
                    staticClass: "btn"
                }, [e("yd-button", {
                    attrs: {
                        size: "large",
                        type: "hollow"
                    },
                    nativeOn: {
                        click: function(e) {
                            return t.goRush(i)
                        }
                    }
                }, [t._v("进入答题")])], 1)])])
            }
            )), 0)])]), e("b-footer", {
                attrs: {
                    location: 1
                }
            })], 1)
        }
          , a = []
          , s = (e("5490"),
        e("6d57"),
        e("9a33"),
        e("9dd9"),
        e("f548"),
        e("be31"))
          , r = e("076e")
          , o = e("9fbb")
          , c = e.n(o)
          , u = e("4781")
          , d = e.n(u)
          , l = e("3805")
          , h = e.n(l)
          , m = {
            name: "SecurityCard",
            components: {
                BFooter: r["a"]
            },
            data: function() {
                return Date.prototype.Format = function(t) {
                    var i = {
                        "M+": this.getMonth() + 1,
                        "d+": this.getDate(),
                        "h+": this.getHours(),
                        "m+": this.getMinutes(),
                        "s+": this.getSeconds(),
                        "q+": Math.floor((this.getMonth() + 3) / 3),
                        S: this.getMilliseconds()
                    };
                    for (var e in /(y+)/.test(t) && (t = t.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length))),
                    i)
                        new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length)));
                    return t
                }
                ,
                {
                    SecurityCardsearchshow: !1,
                    pitchOn: "全部",
                    productionActive: "",
                    activekindActive: "",
                    list: [],
                    activekindArr: [],
                    SecurityCardInfo: {},
                    innerNum: [{
                        name: "打卡排名",
                        link: "/SecurityCard/rank",
                        img: c.a
                    }, {
                        name: "打卡记录",
                        link: "/SecurityCard/PunchRecords",
                        img: d.a
                    }, {
                        name: "打卡说明",
                        link: "/SecurityCard/explain",
                        img: h.a
                    }],
                    TimeList: [],
                    thinkTime: [],
                    AcTime: "",
                    isGorush: !1
                }
            },
            methods: {
                goSecurityCard: function() {
                    var t = this
                      , i = this;
                    this.$openLoading(),
                    this.$axios.get(s["a"].SecurityCard.getActivity, {}).then((function(e) {
                        i.isLoading = !1,
                        t.$closeLoading(),
                        "1" == e.code || 1 == e.code ? (localStorage.setItem("activityId", e.data.id),
                        t.init()) : i.isLoadError = !0
                    }
                    )).catch((function(i) {
                        t.$closeLoading()
                    }
                    ))
                },
                getWorkTypeOne: function() {
                    var t = this
                      , i = this;
                    this.$openLoading(),
                    i.list = [],
                    i.isLoadError = !1,
                    i.isNoData = !1,
                    this.$axios.get(s["a"].SecurityCard.queryThird, {
                        params: {
                            activityId: localStorage.getItem("activityId")
                        }
                    }).then((function(e) {
                        t.$closeLoading(),
                        e && 1 == e.code ? i.list = Object.assign({}, e.data) : i.isLoadError = !0
                    }
                    )).catch((function(e) {
                        i.isLoadError = !0,
                        t.$closeLoading()
                    }
                    ))
                },
                getTimeList: function() {
                    var t = this
                      , i = this;
                    this.$openLoading(),
                    i.list = [],
                    i.isLoadError = !1,
                    i.isNoData = !1,
                    this.$axios.get(s["a"].SecurityCard.BCtime, {
                        params: {
                            activityId: localStorage.getItem("activityId")
                        }
                    }).then((function(e) {
                        t.$closeLoading(),
                        e && 1 == e.code ? (i.TimeList = e.data,
                        t.getWorkTypeOne(),
                        t.timeIntervals()) : i.isLoadError = !0
                    }
                    )).catch((function(e) {
                        i.isLoadError = !0,
                        t.$closeLoading()
                    }
                    ))
                },
                timeInterval: function(t) {
                    var i = ""
                      , e = "";
                    if (t)
                        return i = t.split(",")[0].substring(0, 5),
                        e = t.split(",")[1].substring(0, 5),
                        "".concat(i, "-").concat(e)
                },
                ChantimeFormat: function(t) {
                    return new Date("2019/01/01 " + t)
                },
                timeIntervals: function() {
                    var t = this
                      , i = this.activeTime.replace(/-/g, "/");
                    this.TimeList.forEach((function(e) {
                        if (t.ChantimeFormat(e.time.split(",")[0]) < t.ChantimeFormat(e.time.split(",")[1]))
                            new Date(i) >= t.ChantimeFormat(e.time.split(",")[0]) && new Date(i) <= t.ChantimeFormat(e.time.split(",")[1]) && (t.AcTime = e.id,
                            t.isGorush = !0);
                        else {
                            var n = t.ChantimeFormat(e.time.split(",")[0])
                              , a = new Date("2019/01/01 23:59")
                              , s = new Date("2019/01/01 00:00")
                              , r = t.ChantimeFormat(e.time.split(",")[1]);
                            (new Date(i) >= n && new Date(i) <= a || new Date(i) >= s && new Date(i) <= r) && (t.AcTime = e.id,
                            t.isGorush = !0)
                        }
                    }
                    ))
                },
                goRush: function(t) {
                    //if (!this.isGorush)
                    if (false)
                        return this.$dialog.toast({
                            mes: "未到打卡时间！",
                            icon: "none",
                            timeout: 1e3
                        }),
                        !1;
                    this.$router.push({
                        path: "/SecurityCard/rushanswer",
                        query: {
                            workId: t.id,
                            backPath: "/SecurityCard/index"
                        }
                    })
                },
                goInfo: function(t) {
                    this.$router.push({
                        path: t.link
                    })
                },
                goBack: function() {
                    this.$router.replace({
                        path: "/"
                    })
                },
                init: function() {
                    this.getTimeList()
                }
            },
            mounted: function() {
                window.history && window.history.pushState && (history.pushState(null, null, document.URL),
                window.addEventListener("popstate", this.goBack, !1))
            },
            destroyed: function() {
                window.removeEventListener("popstate", this.goBack, !1)
            },
            created: function() {
                this.activeTime = "2019-01-01 " + (new Date).Format("hh:mm"),
                this.goSecurityCard()
            }
        }
          , p = m
          , g = (e("9022"),
        e("9ca4"))
          , f = Object(g["a"])(p, n, a, !1, null, null, null);
        i["default"] = f.exports
    }
}]);
